﻿<link rel="stylesheet" href="@Url.Content("~/plugin/css/pikaday.css")">
<link rel="stylesheet" href="@Url.Content("~/plugin/css/site.css")">
<script src="@Url.Content("~/plugin/moment.min.js")"></script>
<script src="@Url.Content("~/plugin/pikaday.js")"></script>


@model BulletinMvc.Models.BulletinCreateModel

@{
    ViewBag.Title = "Edit";
}

<h2>编辑公示</h2>
<div id="operate">
@*    @Html.ActionLink("返回", "Index", new { id=ViewData["BulletinYaMa"]})*@
    @Html.ActionLink("返回", "Details","BulletinItem", new { BulletinID= ViewData["BulletinID"],BulletinYaMa=ViewData["BulletinYaMa"],id=ViewData["YeMa"]},null)

</div>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset class="edit">
        <legend></legend>

        <div class="editor-label">
            @Html.LabelFor(model => model.name)
        </div>
        <div class="editor-field long">
            @Html.EditorFor(model => model.name)
            @Html.ValidationMessageFor(model => model.name)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.startdatetime)
        </div>
        <div class="editor-field">
            @Html.TextBoxFor(model => model.startdatetime, new {@id="StartDate",name="StartDate"})
            @*@Html.TextBox(value:Model.startdatetime, htmlAttributes:id,name:"StartDate")*@
@*            <input type="text" id="StartDate" name="StartDate" value="@Html.DisplayFor(model => model.startdatetime)">*@
            @Html.ValidationMessageFor(model => model.startdatetime)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Duedatetime)
        </div>
        <div class="editor-field">
             @Html.TextBoxFor(model => model.Duedatetime, new {@id="DuedateDate",name="DuedateDate"})
@*            <input type="text" id="DuedateDate" name="DuedateDate" value="@Html.DisplayFor(model => model.Duedatetime)">*@
            @Html.ValidationMessageFor(model => model.Duedatetime)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.visible)
        </div>
        <div class="editor-field downlittle">
            @Html.EditorFor(model => model.visible)
            @Html.ValidationMessageFor(model => model.visible)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.StarFeedbackEnabled)
        </div>
        <div class="editor-field downlittle">
            @Html.EditorFor(model => model.StarFeedbackEnabled)
            @Html.ValidationMessageFor(model => model.StarFeedbackEnabled)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.TextFeedbackEnabled)
        </div>
        <div class="editor-field downlittle">
            @Html.EditorFor(model => model.TextFeedbackEnabled)
            @Html.ValidationMessageFor(model => model.TextFeedbackEnabled)
        </div>

        <div class="editor-label fly2">
            @Html.LabelFor(model => model.Description)
        </div>
        <div class="editor-field long">
            @Html.TextAreaFor(model => model.Description)
            @Html.ValidationMessageFor(model => model.Description)
        </div>

        <div class="editor-btn">
            <input type="submit" value="保存" />
        </div>
    </fieldset>

    <script>
        var pikaday1 = new Pikaday({
            field: document.getElementById('StartDate'),
            firstDay: 1,
            minDate: new Date('2005-01-01'),
            maxDate: new Date('2025-12-31'),
            yearRange: [2005,2025],
            onSelect: function () { },
            onOpen: function () {
            }
        });

        var pikaday2 = new Pikaday({
            field: document.getElementById('DuedateDate'),
            minDate: new Date('2005-01-01'),
            maxDate: new Date('2025-12-31'),
            yearRange: [2005, 2025],
            onSelect: function () { }
        });
</script>

}

